home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 3
/
Cream of the Crop 3.iso
/
clipper
/
ks94an.zip
/
INITWIN.HDR
< prev
next >
Wrap
Text File
|
1994-04-25
|
3KB
|
104 lines
/******************************************************************************
The Klipper Library, for CA-Clipper 5.x
Copyright (c), 1994, Wallace Information Systems Engineering
FUNCTION:
_InitWin(Win_Name, Win_TR, Win_TC, Win_BR, Win_BC, Win_Color,Win_Up) --> NIL
PARAMETERS:
Win_Name : Window Name (name referenced by)
Win_TR : Window Corrdinates
Win_TC : ""
Win_BR : ""
Win_BC : ""
Win_Color : Window Color Scheme
Win_Up : Scroll direction 0 = Down, 1 = Up
SHORT:
Initialize a scrolling window for use by other _????Win() functions.
DESCRIPTION:
These functions comprise a set of functions that initialize, update, clear
and kill scrolling windows that scroll information sent to them.
Each array element, up to the number that will fit inside the window
coordinates, has it's first 20 positions filled with information about the
window itself. This allows the array to keep it's number of elements, length
of each element, and the coordinates without any reference to some other
information variables. All that is created is the array itself, and it is
self containing. The passed text is added after position 20, and displayed
from there as well.
Any fiddling with the first 27 bytes of the array is bound to cause problems.
Window motion is either from bottom to top, (1 = upward) or from top to
bottom (0 = downward).
Each element of the array created has the following structure in it's first
27 bytes:
String to Build: "xxxxxxxxxx##########xxxxxx#"
Defined: aaaaaaaaaabbccddeeffggggggh
a = Name of the Window (MAX LENGTH OF NAME 10,space padded)
b = # of history positions to be kept (MAX maxrow())
c = window top left row (MIN 0)
d = window top left col (MIN 0)
e = window bottom right row (MAX maxcol())
f = window bottom right col (MAX maxcol())
g = window display color ("W+/N")
h = Window Upward Motion 1=T 0=F
_InitWin() initializes a scroll window called "exp<c1>" that operates within
the coordinates n1,n2 to n3,n4. It must be called prior to any call
_UpdtWin() that references this window.
NOTE:
EXAMPLE:
* initialize two scroll windows
_InitWin('Current',10,10,20,35)
_InitWin('History',10,40,20,75)
* Update them with some text
_UpdtWin('Current','Cur Line One') // send to first window
_UpdtWin('History','Hist Line One') // send this to second window
_UpdtWin('Current','Cur Line Two') // ditto
_UpdtWin('History','Hist Line Two') // ditto
_ClrWin('History') // clear the history window - current remains unchanged
_UpdtWin('Current','Cur Line Three') // add more
_UpdtWin('History','Hist Line Three')
_UpdtWin('Current','Cur Line Four') // still more
_UpdtWin('History','Hist Line Four')
* at this point, the "CURRENT" window contains:
*
* Cur Line One
* Cur Line Two
* Cur Line Three
* Cur Line Four
*
* and the "HISTORY" window contains
*
* Hist Line Three
* Hist Line Four
_KillWin('Current') // kill both windows
_KillWin('History')
* Both windows disappear!
******************************************************************************/